package com.hwtx.form.domain.repo;

import com.hwtx.form.domain.vo.FormConfigQuerySearchVo;
import com.hwtx.form.domain.vo.FormConfigQueryVo;
import com.hwtx.form.persistence.entity.FormConfigQuery;
import com.hwtx.form.persistence.entity.FormConfigTpl;
import com.hwtx.form.persistence.entity.FormDefDetail;
import io.geekidea.boot.framework.page.Paging;

import java.util.List;

/**
 * 表单定义 服务接口
 *
 * @author hwtx
 * @since 2023-12-10
 */
public interface FormConfigRepo {

    FormDefDetail getFormDetail(Long formId);

    FormDefDetail getFormDetail(String keyId);

    List<FormDefDetail> getFormDetailByModelName(String modelName);

    int updateFormDefDetail(FormDefDetail formDefDetail);

    int saveFormDefDetail(FormDefDetail formDefDetail);

    void saveFormConfigQuery(FormConfigQuery query);

    int updateFormConfigQuery(FormConfigQuery formConfigQuery);

    void updateFormConfigQueryListFormQueryShowStatus(Long formId, FormConfigQuery query);

    FormConfigQuery getFormConfigQuery(Long id);

    List<FormConfigQuery> listFormConfigQuery(FormConfigQuerySearchVo searchVo);

    List<FormConfigQuery> listFormConfigQueryWithExt();

    Paging<FormConfigQueryVo> pageMergedFormConfig(int pageIndex, int pageSize, FormConfigQuerySearchVo searchVo);

    List<FormConfigQueryVo> listMergedFormConfig(FormConfigQuerySearchVo searchVo);

    void deleteFormConfigQuery(Long formId);

    void deleteFormConfigQueryById(Long id);

    void deleteFormDetail(Long formId);

    FormConfigTpl getFormTplConfig(Long formId);

    boolean saveFormTplConfig(FormConfigTpl formConfigTpl);

    boolean updateFormTplConfig(FormConfigTpl formConfigTpl);
}
